package shejimoshi.simplefactory;
/*
*制造工厂
 */
public class TrafficFactory {
    private TrafficFactory(){}
    public static Traffic made(String type){
        switch (type){
            case"火车":return new Train();
            case "汽车":return new Car();
            case "拖拉机":
                default:return null;
        }
    }
}
